package edu.mcw.rgd.clinminer.web.main;

import org.vaadin.navigator.Navigator;

import com.vaadin.Application;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.Reindeer;

public class WelcomeView extends VerticalLayout implements Navigator.View {
	public WelcomeView() {
		setMargin(true);
		setSizeFull();
		addStyleName(Reindeer.LAYOUT_BLUE);
		Label l = new Label(
				"<h1 class=\"v-label-h1\" style=\"text-align: center;\">ClinMynEHR</h1> <p style='text-align:center;border:0px dashed black;padding:5px;'>A lightweight, open source, electronic health record system (EHR) <br><br/>facilitating the storage and analysis of clinical research data.</p><p <p align='center'>&copy; <a href='http://rgd.mcw.edu'>Bioinformatics Program, HMGC</a> at the <a href='http://www.mcw.edu/'>Medical College of Wisconsin</a></p>",
				Label.CONTENT_XHTML);
		l.setSizeUndefined();
		l.addStyleName(Reindeer.LABEL_SMALL);
		addComponent(l);
		setComponentAlignment(l, Alignment.MIDDLE_CENTER);
	}

	@Override
	public void init(Navigator navigator, Application application) {
		// nothing to do
	}

	@Override
	public void navigateTo(String requestedDataId) {
		// no subpages
	}

	@Override
	public String getWarningForNavigatingFrom() {
		return null;
	}
}